/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code;

import com.baidu.bjf.remoting.protobuf.EnumReadable;

/**
 *
 * @author CHengJILI
 */
public enum TradeOperate  implements EnumReadable {
    PTMR(1) { public int getCode() {return 1;} public String getName() {return "普通买入"; }},
    PTMC(2) { public int getCode() {return 2;} public String getName() {return "普通卖出"; }},
    XGSG(3) { public int getCode() {return 3;} public String getName() {return "新股申购"; }},
    JJSG(4) { public int getCode() {return 4;} public String getName() {return "基金申购"; }},
    JSSH(5) { public int getCode() {return 5;} public String getName() {return "基金赎回"; }},
    JJCF(6) { public int getCode() {return 6;} public String getName() {return "基金拆分"; }},
    JJHB(7) { public int getCode() {return 7;} public String getName() {return "基金合并"; }},
    ZZG(8) { public int getCode() {return 8;} public String getName() {return "债转股"; }},
    FHSD(9) { public int getCode() {return 9;} public String getName() {return "分红设定"; }},
    ZQZYRK(10) { public int getCode() {return 10;} public String getName() {return "债券质押入库"; }},
    ZYZQCK(11) { public int getCode() {return 11;} public String getName() {return "质押债券出库"; }},
    ZYSZHG(12) { public int getCode() {return 12;} public String getName() {return "质押式正回购"; }},
    ZYSNHG(13) { public int getCode() {return 13;} public String getName() {return "质押式逆回购"; }},
    MDSZHG(14) { public int getCode() {return 14;} public String getName() {return "买断式正回购"; }},
    MDSNHG(15) { public int getCode() {return 15;} public String getName() {return "买断式逆回购"; }},
    
    LYSB(16) { public int getCode() {return 16;} public String getName() {return "履约申报"; }},
    RZMR(17) { public int getCode() {return 17;} public String getName() {return "融资买入"; }},
    RQMC(18) { public int getCode() {return 18;} public String getName() {return "融券卖出"; }},
    MQHK(19) { public int getCode() {return 19;} public String getName() {return "卖券还款"; }},
    MQHQ(20) { public int getCode() {return 20;} public String getName() {return "买券还券"; }},
    ZJHK(21) { public int getCode() {return 21;} public String getName() {return "直接还款"; }},
    ZJHQ(22) { public int getCode() {return 22;} public String getName() {return "直接还券"; }},
    BDQSD(23) { public int getCode() {return 23;} public String getName() {return "备兑证券锁定"; }},
    BDQJS(24) { public int getCode() {return 24;} public String getName() {return "备兑证券解锁"; }},
    BDKC(25) { public int getCode() {return 25;} public String getName() {return "备兑开仓"; }},
    BDPC(26) { public int getCode() {return 26;} public String getName() {return "备兑平仓"; }},
    MRKC(27) { public int getCode() {return 27;} public String getName() {return "买入开仓"; }},
    MCPC(28) { public int getCode() {return 28;} public String getName() {return "卖出平仓"; }},
    MCKC(29) { public int getCode() {return 29;} public String getName() {return "卖出开仓"; }},
    MRPC(30) { public int getCode() {return 30;} public String getName() {return "买入平仓"; }},
    XQ(31) { public int getCode() {return 31;} public String getName() {return "行权"; }},
    C_BO(32) { public int getCode() {return 32;} public String getName() {return "买入开仓"; }},
    C_SC(33) { public int getCode() {return 33;} public String getName() {return "卖出平仓"; }},
    C_SO(34) { public int getCode() {return 34;} public String getName() {return "卖出开仓"; }},
    C_BC(35) { public int getCode() {return 35;} public String getName() {return "买入平仓"; }},
    OTHER(37) { public int getCode() {return 37;} public String getName() {return "其他"; }},
    CD(36) { public int getCode() {return 36;} public String getName() {return "撤单"; }};

    public abstract String getName();
    public abstract int getCode();
    private final int value;
    TradeOperate(int value) { this.value = value; }
    public static TradeOperate DeCode(int code){
        switch (code){
            case 1:{return TradeOperate.PTMR;}
            case 2:{return TradeOperate.PTMR;}
            case 3:{return TradeOperate.PTMR;}
            case 4:{return TradeOperate.PTMR;}
            case 5:{return TradeOperate.PTMR;}
            case 6:{return TradeOperate.PTMR;}
            case 7:{return TradeOperate.PTMR;}
            case 8:{return TradeOperate.PTMR;}
            case 9:{return TradeOperate.PTMR;}
            case 10:{return TradeOperate.PTMR;}
            case 11:{return TradeOperate.PTMR;}
            case 12:{return TradeOperate.PTMR;}
            case 13:{return TradeOperate.PTMR;}
            case 14:{return TradeOperate.PTMR;}
            case 15:{return TradeOperate.PTMR;}
            case 16:{return TradeOperate.PTMR;}
            case 17:{return TradeOperate.PTMR;}
            case 18:{return TradeOperate.PTMR;}
            case 19:{return TradeOperate.PTMR;}
            case 20:{return TradeOperate.PTMR;}
            case 21:{return TradeOperate.PTMR;}
            case 22:{return TradeOperate.PTMR;}
            case 23:{return TradeOperate.PTMR;}
            case 24:{return TradeOperate.PTMR;}
            case 25:{return TradeOperate.PTMR;}
            case 26:{return TradeOperate.PTMR;}
            case 27:{return TradeOperate.PTMR;}
            case 28:{return TradeOperate.PTMR;}
            case 29:{return TradeOperate.PTMR;}
            case 30:{return TradeOperate.PTMR;}
            case 31:{return TradeOperate.PTMR;}
            case 32:{return TradeOperate.PTMR;}
            case 33:{return TradeOperate.PTMR;}
            case 34:{return TradeOperate.PTMR;}
            case 35:{return TradeOperate.PTMR;}
            case 36:{return TradeOperate.PTMR;}
            default :{return TradeOperate.OTHER;}
        }
    }
    public int value() { return this.value; }
}
